﻿using Abp.Application.Services.Dto;
using SingleUserMall.Common;
using SingleUserMall.Items.Form;
using SingleUserMall.Items.VO;
using SingleUserMall.Mall.VO;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SingleUserMall.Items
{
    /// <summary>
    /// 商品
    /// </summary>
    [Description("商品")]
    public interface IItemAppService : IAppService
    {
        /// <summary>
        /// 获取类别下的商品
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<ItemMiniVO>> GetItemsAsync(CategoryItemSearchForm form);
        /// <summary>
        /// 购买树分水果列表
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<ItemMiniVO>> GetItemsByTreeAsync(CategoryItemSearchForm form);

        /// <summary> 
        /// 获取分红商品商品
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<ItemMiniVO>> GetDividendItemsAsync(CategoryItemSearchForm form);

        /// <summary>
        /// 查询首页类别信息
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<ItemCategoryVO>> GetIndexItemCategorysAsync();
        /// <summary>
        /// 获取商品类别列表
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<ListResultDto<ItemCategoryVO>> GetItemCategoriesAsync(ItemCategorySearchForm form);
        /// <summary>
        /// 获取商品详情
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<ItemAppVO> GetItemAsync(ItemOneForm form);
        /// <summary>
        /// 获取商品评论
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<ItemCommentVO>> GetItemCommentsAsync(CommentSearchForm form);
        /// <summary>
        /// 获取商品评论标签及数量
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<ItemCommentTotalVO> GetItemCommentTotalAsync(ItemCommentTotalForm form);
        /// <summary>
        /// 收藏商品，输入商品id
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task FavoriteAsync(SingleId<long> form);
        /// <summary>
        /// 取消收藏商品，输入商品id
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task NotFavoriteAsync(SingleId<long> form);
        /// <summary>
        /// 取消收藏商品，输入商品id
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<ListResultDto<BusinessScopeVO>> GetEnableBusinessScopeAsync(BusinesssSearchForm form);
        /// <summary>
        /// 获取对应店铺的抢购商品
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<PagedResultDto<ItemMiniVO>> GetLimitItemsAsync(LimitItemSearch form);
        /// <summary>
        /// 根据商品Id获得推荐商品
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<ListResultDto<ItemMiniVO>> GetRecommendItemsByIdAsync(SingleId<long> form);
        /// <summary>
        /// 发起砍价
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task StartItemBargain(ItemBargainForm form);
        /// <summary>
        /// 加入砍价
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>
        Task<ItemAppVO> JoinItemBargain(SingleId<long> form);

        /// <summary>
        /// 获取砍价中商品列表
        /// </summary>
        /// <param name="form"></param>
        /// <returns></returns>

        Task<PagedResultDto<UserItemBarginVO> >GetItemBarginAsync(ItemBargainSearchForm form);





    }
}
